package com.mikelouis.test.scala.proginscala.chapter14

import junit.framework.TestCase
import junit.framework.Assert.assertEquals
import junit.framework.Assert.fail

/**
 * Created by yuazhu on 1/16/2015.
 */
class Element2Junit3TestCase extends TestCase {
  def testUniformElement2(): Unit = {
    val ele = Element2.elem('x', 2, 3)
    assertEquals(2, ele.width)
    assertEquals(3, ele.height)
    try {
      Element2.elem('x', 2, 3)
//      fail()
    }
    catch {
      case e: IllegalArgumentException => println("IlleagalArgumentException")
    }
  }
}
